@extends('admin.layouts.app')
@section('content')
<div class="row">
    <div class="col-md-12">
        <!--breadcrumbs start -->
        <ul class="breadcrumb panel">
            <li><a href="#"><i class="fa fa-home"></i> 首页</a></li>
            <li><a href="{{url('info/index')}}">信息管理</a></li>
            <li><a href="#">{{$res->name}}</a></li>
            <li class="active"><a href="{{url('info/add',['cat_id'=>$res->cate_id])}}">添加</a></li>
        </ul>
        <!--breadcrumbs end -->
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-body">
        @if ($page[0])
             <table class="table table-bordered table-striped">
            <tr class="success">
                <td>标题</td>
                <td>发布时间</td>
                <td>操作</td>
            </tr>
            @foreach($page as $key)
            <tr>
                <td>{{ $key->title}}</td>
                <td>{{ $key->creattime}}</td>
                <td>
                    <a class="btn btn-primary btn-xs" href="{{url('info/edit',['id'=>$key->info_id])}}">编辑</a>
                    <button class="btn btn-default btn-xs" type="button" onclick="del({{$key->info_id}});">删除</button>
                </td>
            </tr>
            @endforeach
        </table>
        {{$page->links()}}
        @else
            暂无数据
        @endif
    </div>
</div>
@endsection



@section('js')
<script src="{{asset('adminex')}}/layer/layer.js"></script>
<script type="text/javascript">
</script>
@endsection